import 'package:emoji_picker/emoji_picker.dart';
/// CreateTime 2020/6/12 15:07
/// CreateUser chen 
/// ProjectName flutter_elf
import 'package:flutter_elf/config/component_index.dart';
import 'package:flutter_elf/config/emoj_list.dart';

class SelectEmojPage extends StatefulWidget{
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return SelectEmojPageState();
  }
}

class SelectEmojPageState extends State<SelectEmojPage>{

  int hex = 0xE001;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    Runes input = new Runes(
        '\ud83d\udc7c\u6d4b\u8bd5\u4e2d\u6587\u8f6c\u6362\u{1f44a}');
    print(input.toList());
    print(new String.fromCharCodes(input));
    return Scaffold(
      appBar: AppBarCreator.create(context, 'emoj'),
      body: ListView(
        children: <Widget>[
          Text(String.fromCharCode(0x1f44f)),
          Text('😊'),
          Text('\\u{1F60B}'),
          Text(String.fromCharCode(128517)),
          Text(String.fromCharCode(0x1f605)),
          Text('==>' + String.fromCharCode(0xE0011)),
          Text(String.fromCharCodes(input)),

          TextField(
            onChanged: (s){
              print(s.runes.toString());
            },
          ),

          Wrap(
            children: EmojList.animals.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.travel.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.activities.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.flags.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.foods.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.objects.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.smileys.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

          Wrap(
            children: EmojList.symbols.values.map<Widget>((v){
              return Text(v);
            }).toList(),
          ),

        ],
      ),
    );
  }
}